<?php
require_once("inc.member.php");

$this_title="$vars[member_title] &raquo; ".__("Placement Paradigm");
$page_title=__("Placement Paradigm");
$content_title=__("Placement Paradigm");

require_once('inc.genealogy_tab.php');


/*##### FORM POST #####*/
if($_POST["__req"]){

 if(!$errmsg){
	//check password
  	if(!strlen($post_s["authcode"])){
   		$errmsg.=replace_tag(__("'<%field%>' is a required field."), array("<%field%>"=>__("AuthCode")))."<br />\n";
  	}else{
   		$enc_pass=explode(":", $r_user["ewallet_enc_password"]);
   		if(md5($post_s["authcode"].$enc_pass[1]) != $enc_pass[0]){
    		$errmsg.=__("You have entered an invalid AuthCode.")."<br />\n";
   		}else{
   			$_SESSION['show_tree2'] = 1;
   		}
  	}
  
 }
 
 $errmsg=$errmsg? format_err($errmsg) : "";

}

//show member matrix
if($get_s["cur_uid"] && $get_s["cur_uid"]!=$head_info["code"]){
	$first_user = get_user_detail_by_code($get_s["cur_uid"]);
	$first_id = $first_user['id'];
}else{
	$first_id = $uid;
}

$user1 = get_user_detail_by_id($first_id);
$user2 = get_user_cf_by_upline_id($user1['id'],'1');
$user3 = get_user_cf_by_upline_id($user1['id'],'2');

if($user2['id']>0){
	$user4 = get_user_cf_by_upline_id($user2['id'],'1');
	$user5 = get_user_cf_by_upline_id($user2['id'],'2');
	
	if($user4['id']>0){
		$user8 = get_user_cf_by_upline_id($user4['id'],'1');
		$user9 = get_user_cf_by_upline_id($user4['id'],'2');
		
		if($user8['id']>0){
			$user16 = get_user_cf_by_upline_id($user8['id'],'1');
			$user17 = get_user_cf_by_upline_id($user8['id'],'2');		
		}
		if($user9['id']>0){
			$user18 = get_user_cf_by_upline_id($user9['id'],'1');
			$user19 = get_user_cf_by_upline_id($user9['id'],'2');		
		}
	}	
	if($user5['id']>0){
		$user10 = get_user_cf_by_upline_id($user5['id'],'1');
		$user11 = get_user_cf_by_upline_id($user5['id'],'2');
		
		if($user10['id']>0){
			$user20 = get_user_cf_by_upline_id($user10['id'],'1');
			$user21 = get_user_cf_by_upline_id($user10['id'],'2');		
		}
		if($user11['id']>0){
			$user22 = get_user_cf_by_upline_id($user11['id'],'1');
			$user23 = get_user_cf_by_upline_id($user11['id'],'2');		
		}
	}
}

if($user3['id']>0){
	$user6 = get_user_cf_by_upline_id($user3['id'],'1');
	$user7 = get_user_cf_by_upline_id($user3['id'],'2');
	
	if($user6['id']>0){
		$user12 = get_user_cf_by_upline_id($user6['id'],'1');
		$user13 = get_user_cf_by_upline_id($user6['id'],'2');
		
		if($user12['id']>0){
			$user24 = get_user_cf_by_upline_id($user12['id'],'1');
			$user25 = get_user_cf_by_upline_id($user12['id'],'2');		
		}
		if($user13['id']>0){
			$user26 = get_user_cf_by_upline_id($user13['id'],'1');
			$user27 = get_user_cf_by_upline_id($user13['id'],'2');		
		}
	}	
	if($user7['id']>0){
		$user14 = get_user_cf_by_upline_id($user7['id'],'1');
		$user15 = get_user_cf_by_upline_id($user7['id'],'2');
		
		if($user14['id']>0){
			$user28 = get_user_cf_by_upline_id($user14['id'],'1');
			$user29 = get_user_cf_by_upline_id($user14['id'],'2');		
		}
		if($user15['id']>0){
			$user30 = get_user_cf_by_upline_id($user15['id'],'1');
			$user31 = get_user_cf_by_upline_id($user15['id'],'2');		
		}
	}
}

$messaging = '		
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td width="1%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="5.5%">&nbsp;</td>
<td width="1%">&nbsp;</td>
</tr>
<tr>';

if($uid<>$user1['id']){
$up = get_user_detail_by_id($user1['matrix_upline']);
$messaging .= '	
<td>&nbsp;</td>
<td colspan="16" align="center"><a href="'.$vars['file']['member']['network']."?cur_uid=".$up['code'].'"><img src="../images/network/upmore.gif"></a></td>
<td>&nbsp;</td>
</tr>';
}

$messaging .= '	
<tr>
<td>&nbsp;</td>
<td colspan="16" align="center"><img src="../image/icon.png"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="16" align="center"><table border=1><tr><td colspan=2>'.__("Member ID").': '.$user1['username'].'<br>'.__("Rank").': '.($user1['rank_a']? __($vars['rank_index_a_d'][$user1['rank_a']]) : __("None")).'<br>'.__('Left').': '.number_format($user2['amount']).'<br>'.__('Right').': '.number_format($user3['amount']).'</td></tr></table></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="4">&nbsp;</td>
<td colspan="4" style="border-right:1mm solid #2284C6; border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="4" style="border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="4">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="4">&nbsp;</td>
<td colspan="4" style="border-left:1mm solid #2284C6">&nbsp;</td>
<td colspan="4" style="border-right:1mm solid #2284C6">&nbsp;</td>
<td colspan="4">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="8" align="center">'.($user2['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user2['code'].'"><img src="../image/icon.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td colspan="8" align="center">'.($user3['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user3['code'].'"><img src="../image/icon.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="8" align="center"><table border=1><tr><td colspan=2>'.($user2['rank_a']? __("Member ID").': '.$user2['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user2['rank_a']]).'<br>'.__('Left').': '.number_format($user4['amount']).'<br>'.__('Right').': '.number_format($user5['amount']) : ($user1['code']==''? __("Register") : "<a href='".$vars['file']['member']['register']."?upline=".$user1['code']."&pos=1'>".__("Register")."</a>")).'</td></tr></table></td>
<td colspan="8" align="center"><table border=1><tr><td colspan=2>'.($user3['rank_a']? __("Member ID").': '.$user3['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user3['rank_a']]).'<br>'.__('Left').': '.number_format($user6['amount']).'<br>'.__('Right').': '.number_format($user7['amount']) : ($user1['code']==''? __("Register") : "<a href='".$vars['file']['member']['register']."?upline=".$user1['code']."&pos=2'>".__("Register")."</a>")).'</td></tr></table></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td colspan="2" style="border-right:1mm solid #2284C6; border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="2" style="border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td colspan="2" style="border-right:1mm solid #2284C6; border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="2" style="border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td colspan="2" style="border-left:1mm solid #2284C6">&nbsp;</td>
<td colspan="2" style="border-right:1mm solid #2284C6">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td colspan="2" style="border-left:1mm solid #2284C6">&nbsp;</td>
<td colspan="2" style="border-right:1mm solid #2284C6">&nbsp;</td>
<td colspan="2">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="4" align="center">'.($user4['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user4['code'].'"><img src="../image/icon.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td colspan="4" align="center">'.($user5['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user5['code'].'"><img src="../image/icon.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td colspan="4" align="center">'.($user6['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user6['code'].'"><img src="../image/icon.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td colspan="4" align="center">'.($user7['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user7['code'].'"><img src="../image/icon.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="4" align="center"><table border=1><tr><td colspan=2>'.($user4['rank_a']? __("Member ID").': '.$user4['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user4['rank_a']]).'<br>'.__('Left').': '.number_format($user8['amount']).'<br>'.__('Right').': '.number_format($user9['amount']) : ($user2['code']==''? "" : "<a href='".$vars['file']['member']['register']."?upline=".$user2['code']."&pos=1'>".__("Register")."</a>")).'</td></tr></table></td>
<td colspan="4" align="center"><table border=1><tr><td colspan=2>'.($user5['rank_a']? __("Member ID").': '.$user5['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user5['rank_a']]).'<br>'.__('Left').': '.number_format($user10['amount']).'<br>'.__('Right').': '.number_format($user11['amount']) : ($user2['code']==''? "" : "<a href='".$vars['file']['member']['register']."?upline=".$user2['code']."&pos=2'>".__("Register")."</a>")).'</td></tr></table></td>
<td colspan="4" align="center"><table border=1><tr><td colspan=2>'.($user6['rank_a']? __("Member ID").': '.$user6['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user6['rank_a']]).'<br>'.__('Left').': '.number_format($user12['amount']).'<br>'.__('Right').': '.number_format($user13['amount']) : ($user3['code']==''? "" : "<a href='".$vars['file']['member']['register']."?upline=".$user3['code']."&pos=1'>".__("Register")."</a>")).'</td></tr></table></td>
<td colspan="4" align="center"><table border=1><tr><td colspan=2>'.($user7['rank_a']? __("Member ID").': '.$user7['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user7['rank_a']]).'<br>'.__('Left').': '.number_format($user14['amount']).'<br>'.__('Right').': '.number_format($user15['amount']) : ($user3['code']==''? "" : "<a href='".$vars['file']['member']['register']."?upline=".$user3['code']."&pos=2'>".__("Register")."</a>")).'</td></tr></table></td>
<td>&nbsp;</td>
</tr>

<tr>
<td>&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1" style="border-right:1mm solid #2284C6; border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="1" style="border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1" style="border-right:1mm solid #2284C6; border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="1" style="border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1" style="border-right:1mm solid #2284C6; border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="1" style="border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1" style="border-right:1mm solid #2284C6; border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="1" style="border-bottom:1mm solid #2284C6">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1" style="border-left:1mm solid #2284C6">&nbsp;</td>
<td colspan="1" style="border-right:1mm solid #2284C6">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1" style="border-left:1mm solid #2284C6">&nbsp;</td>
<td colspan="1" style="border-right:1mm solid #2284C6">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1" style="border-left:1mm solid #2284C6">&nbsp;</td>
<td colspan="1" style="border-right:1mm solid #2284C6">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td colspan="1" style="border-left:1mm solid #2284C6">&nbsp;</td>
<td colspan="1" style="border-right:1mm solid #2284C6">&nbsp;</td>
<td colspan="1">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2" align="center">'.($user8['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user8['code'].'"><img src="../image/icon.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td colspan="2" align="center">'.($user9['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user9['code'].'"><img src="../image/icon'.($matrix['lvl2_2']=='0'?"0":"").'.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td colspan="2" align="center">'.($user10['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user10['code'].'"><img src="../image/icon'.($matrix['lvl2_3']=='0'?"0":"").'.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td colspan="2" align="center">'.($user11['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user11['code'].'"><img src="../image/icon'.($matrix['lvl2_4']=='0'?"0":"").'.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td colspan="2" align="center">'.($user12['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user12['code'].'"><img src="../image/icon'.($matrix['lvl2_1']=='0'?"0":"").'.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td colspan="2" align="center">'.($user13['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user13['code'].'"><img src="../image/icon'.($matrix['lvl2_2']=='0'?"0":"").'.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td colspan="2" align="center">'.($user14['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user14['code'].'"><img src="../image/icon'.($matrix['lvl2_3']=='0'?"0":"").'.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td colspan="2" align="center">'.($user15['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user15['code'].'"><img src="../image/icon'.($matrix['lvl2_4']=='0'?"0":"").'.png"></a>' : '<img src="../image/icon0.png">').'</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2" align="center"><table border=1><tr><td colspan=2>'.($user8['rank_a']? __("Member ID").': '.$user8['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user8['rank_a']]).'<br>'.__('Left').': '.number_format($user16['amount']).'<br>'.__('Right').': '.number_format($user17['amount']) : ($user4['code']==''? "" : "<a href='".$vars['file']['member']['register']."?upline=".$user4['code']."&pos=1'>".__("Register")."</a>")).'</td></tr></table></td>
<td colspan="2" align="center"><table border=1><tr><td colspan=2>'.($user9['rank_a']? __("Member ID").': '.$user9['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user9['rank_a']]).'<br>'.__('Left').': '.number_format($user18['amount']).'<br>'.__('Right').': '.number_format($user19['amount']) : ($user4['code']==''? "" : "<a href='".$vars['file']['member']['register']."?upline=".$user4['code']."&pos=2'>".__("Register")."</a>")).'</td></tr></table></td>
<td colspan="2" align="center"><table border=1><tr><td colspan=2>'.($user10['rank_a']? __("Member ID").': '.$user10['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user10['rank_a']]).'<br>'.__('Left').': '.number_format($user20['amount']).'<br>'.__('Right').': '.number_format($user21['amount']) : ($user5['code']==''? "" : "<a href='".$vars['file']['member']['register']."?upline=".$user5['code']."&pos=1'>".__("Register")."</a>")).'</td></tr></table></td>
<td colspan="2" align="center"><table border=1><tr><td colspan=2>'.($user11['rank_a']? __("Member ID").': '.$user11['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user11['rank_a']]).'<br>'.__('Left').': '.number_format($user22['amount']).'<br>'.__('Right').': '.number_format($user23['amount']) : ($user5['code']==''? "" : "<a href='".$vars['file']['member']['register']."?upline=".$user5['code']."&pos=2'>".__("Register")."</a>")).'</td></tr></table></td>
<td colspan="2" align="center"><table border=1><tr><td colspan=2>'.($user12['rank_a']? __("Member ID").': '.$user12['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user12['rank_a']]).'<br>'.__('Left').': '.number_format($user24['amount']).'<br>'.__('Right').': '.number_format($user25['amount']) : ($user6['code']==''? "" : "<a href='".$vars['file']['member']['register']."?upline=".$user6['code']."&pos=1'>".__("Register")."</a>")).'</td></tr></table></td>
<td colspan="2" align="center"><table border=1><tr><td colspan=2>'.($user13['rank_a']? __("Member ID").': '.$user13['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user13['rank_a']]).'<br>'.__('Left').': '.number_format($user26['amount']).'<br>'.__('Right').': '.number_format($user27['amount']) : ($user6['code']==''? "" : "<a href='".$vars['file']['member']['register']."?upline=".$user6['code']."&pos=2'>".__("Register")."</a>")).'</td></tr></table></td>
<td colspan="2" align="center"><table border=1><tr><td colspan=2>'.($user14['rank_a']? __("Member ID").': '.$user14['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user14['rank_a']]).'<br>'.__('Left').': '.number_format($user28['amount']).'<br>'.__('Right').': '.number_format($user29['amount']) : ($user7['code']==''? "" : "<a href='".$vars['file']['member']['register']."?upline=".$user7['code']."&pos=1'>".__("Register")."</a>")).'</td></tr></table></td>
<td colspan="2" align="center"><table border=1><tr><td colspan=2>'.($user15['rank_a']? __("Member ID").': '.$user15['username'].'<br>'.__("Rank").': '.__($vars['rank_index_a_d'][$user15['rank_a']]).'<br>'.__('Left').': '.number_format($user30['amount']).'<br>'.__('Right').': '.number_format($user31['amount']) : ($user7['code']==''? "" : "<a href='".$vars['file']['member']['register']."?upline=".$user7['code']."&pos=2'>".__("Register")."</a>")).'</td></tr></table></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td colspan="2" align="center">'.($user8['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user8['code'].'"><img src="../images/network/more.gif"></a>' : '').'</td>
<td colspan="2" align="center">'.($user9['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user9['code'].'"><img src="../images/network/more.gif"></a>' : '').'</td>
<td colspan="2" align="center">'.($user10['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user10['code'].'"><img src="../images/network/more.gif"></a>' : '').'</td>
<td colspan="2" align="center">'.($user11['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user11['code'].'"><img src="../images/network/more.gif"></a>' : '').'</td>
<td colspan="2" align="center">'.($user12['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user12['code'].'"><img src="../images/network/more.gif"></a>' : '').'</td>
<td colspan="2" align="center">'.($user13['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user13['code'].'"><img src="../images/network/more.gif"></a>' : '').'</td>
<td colspan="2" align="center">'.($user14['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user14['code'].'"><img src="../images/network/more.gif"></a>' : '').'</td>
<td colspan="2" align="center">'.($user15['id']? '<a href="'.$vars['file']['member']['network']."?cur_uid=".$user15['code'].'"><img src="../images/network/more.gif"></a>' : '').'</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>';

if($_SESSION['show_tree2']=='1'){
$matrix="
<p>".__("Placement").": <select name='cur_uid' id='cur_uid' onchange=\"window.location='$this_file?cur_uid='+document.getElementById('cur_uid').value;\" >".get_placement_downline($uid, $_GET['cur_uid'])."</select>&nbsp;<button type='button' onclick=\"window.location='$this_file?cur_uid='+".get_left_code($user1['code']).";\" >".__('Bottom Left')."</button>&nbsp;<button type='button' onclick=\"window.location='$this_file?cur_uid='+".get_right_code($user1['code']).";\" >".__('Bottom Right')."</button></p>$messaging";
/*<br />\n
".__("Sponsor ID:")." ".($r_user["ref"]? $r_user["ref"] : __("None"))."<br />\n
".__("Upline ID:")." ".($r_user["matrix_upline"]? $r_user["matrix_upline"]." ".__("Position").__(":")." ".$r_user["matrix_position"] : __("None"))."</p>
$matrix";*/
}else{
$matrix=($errmsg || $msg? 	"$errmsg $msg" : "")."
<form name='tree_form' method='post' action='$this_file'>


	<input type='hidden' name='__req' value='1' />

	<table class='pbt_table'>

	 <tr>
	
	  <td width='$td_width'>AuthCode:</td>
	
	  <td><input type='text' name='authcode' $inputbox_style /></td>    
	
	 </tr>

	 <tr>
	
	  <td colspan='2' class='center' style='padding:20px 0 20px 0;'>
	
	   <input type='submit' value=\"".__("Submit")."\" />
	
	  </td>
	
	 </tr>
	
	</table>
	
</form>";	
}

$matrix=str_replace("<%tab_content%>", "<h2>$page_title</h2>".$matrix, $tab);
$content="$matrix";
//$content=str_replace("<%tab_content%>", $content, $tab);

print format_member_page($content, $this_title, $content_title, $css);
?>